package org.example.springioc.Config;

import org.apache.catalina.User;
import org.example.springioc.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;


@Configuration
public class BeanConfig {
    @Primary
    @Bean
    public UserInfo userInfo(){
        return new UserInfo("zhangsan");
    }

    @Bean
    public UserInfo userInfo2(){
        return new UserInfo("lisi");
    }
}
